package com.codi.bus.core.dao;

import com.codi.base.dao.v2.GeneratedBaseDao;
import com.codi.bus.core.domain.CdUserShare;

import java.util.List;

/**
 * 亲，写个类注释呗
 * @author BigZeng
 * @date 2018-05-06 17:38
 */
public interface CdUserShareDao extends GeneratedBaseDao<CdUserShare> {
    CdUserShare selectUserShare(CdUserShare order);
    List<CdUserShare> selectAllShare();

    List<CdUserShare> selectOneDayShare(String date);

    List<CdUserShare> selectNewShare(Integer userId, String clientId, String tradeAcco, String fundCode);

    List<CdUserShare> selectNewPortfolioShare(Integer userId, String clientId);

    List<CdUserShare> selectAllOldShare();
    void updateShare(CdUserShare cdUserShare);

    void updateShareExpired(CdUserShare cdUserShare);

    void updateShareOld();

    void updateShareToday(String createTime);

    void changeShareToday(String createTime);

    /**
     * 根据用户id和交易账号查询用户份额
     *
     * @param userId
     * @param portfolioTradeAcco
     * @return
     */
    List<CdUserShare> selectByUserIdAndTradeAcco(Long userId, String portfolioTradeAcco);
}
